package com._2_2;

public class OperatorSign {

	public static void main(String[] args) {
		int a = 3, b = 4;
		int intA = a / b;	//根据基本类型自动转换规则，除数与被除数都是整数
		float intB = a / b;
		float intC = a / (b * 2.0f);//对于声明float类型的数字，数字后加f
		double intD = a / (b * 2.0d);//对于生命double类型的数字，数字后加d
		int a1 = 10;
		int b1 = 3;
		int c = 2;
		System.out.println(intA);
		System.out.println(intB);
		System.out.println(intC);
		System.out.println(intD);
		System.out.println(a1 / b1);
		System.out.println(a1 % b1);
		System.out.println(a1 / c);
		System.out.println(a1 % c);
		
		int x = 12;
		int a2 = x + x++;	//定义一个自增变量
		System.out.println(a2);
		System.out.println(x);
		int b2 = x++ + x;
		System.out.println(b2);
		System.out.println(x);
		
		int c2 = x + x--;	//定义一个自减变量
		System.out.println(c2);
		System.out.println(x);
		int d2 = x+ --x;
		System.out.println(d2);
		System.out.println(x);
	}
}
